-- GENERATED SPELL FOR [Grimkor the Wicked] --


function spell0_32162(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32162', 3000, 1)
end

function spell1_32162(pUnit, Event) --@Summon Skeletons,n/a--
pUnit:FullCastSpellOnTarget(52611,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32162', 2000, 1)
end

function Sorts_32162(pUnit, Event)
local choix_sorts_32162 = math.random(0, 1)
if choix_sorts_32162 == 0 then
pUnit:RegisterEvent('spell0_32162', 1, 1)
end
if choix_sorts_32162 == 1 then
pUnit:RegisterEvent('spell1_32162', 1, 1)
end
end

function mob32162_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32162', math.random(1500, 3000), 1)
end

function mob32162_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32162_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32162_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32162, 1, 'mob32162_Action')
RegisterUnitEvent(32162, 2, 'mob32162_Leave')
RegisterUnitEvent(32162, 3, 'mob32162_Kill')
RegisterUnitEvent(32162, 4, 'mob32162_Die')
